<%-- 
    Document   : listZipCode
    Created on : 9 Nov, 2012, 10:10:14 PM
    Author     : yogesh
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="../common/script.jsp" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="../common/title.jsp" %>
    </head>
    <body>
        <%@include file="../common/header.jsp" %>
        <%@include file="../common/menu.jsp" %>
        <div class="in_02">
            <%@include file="../common/message.jsp" %>
            <h1><spring:message code="title.zipCodeList"/></h1><br/>
            <sec:authorize ifAnyGranted="ROLE_BF_ZIP_ADD">
            &nbsp;&nbsp;&nbsp;<span style="font-size: 15px; font-weight: bold;"><a href="../hospital/addZipCode.htm">Add Zipcode</a></span> 
            </sec:authorize><br/><br/>
            &nbsp;&nbsp;&nbsp;<c:out value="${fn:length(zipCodeList)}"/> <spring:message code="rowsFound"/>
            <table  class="data_table" border="1px">
                <tr class="header">
                    <th width="150px"><spring:message code="zipCode"/></th>
                    <th width="200px"><spring:message code="area"/></th>

                    <th width="80px"><spring:message code="cityName"/></th>
                    <th width="100px"><spring:message code="stateName"/></th>
                    <sec:authorize ifAnyGranted="ROLE_BF_ZIP_EDIT">
                        <th>&nbsp;</th>
                    </sec:authorize>
                </tr>
                <c:forEach items="${zipCodeList}" var="zipCodeItem">
                    <tr>
                        <td align="center"><c:out value="${zipCodeItem.zipCode}"/></td>
                        <td align="center"><c:out value="${zipCodeItem.area}"/></td>

                        <td align="center"><c:out value="${zipCodeItem.masterZone.cityId.cityName}"/></td>
                        <td align="center"><c:out value="${zipCodeItem.masterZone.cityId.stateId.stateName}"/></td>
                        <sec:authorize ifAnyGranted="ROLE_BF_ZIP_EDIT">
                            <td><a href="editZipCode.htm?zipCodeId=<c:out value="${zipCodeItem.zipCodeId}"/>"><img src="../images/edit.png"  width="20" height="20" style="border: none" alt="Edit" title="Edit"/></a></td>
                                </sec:authorize>

                    </tr>
                </c:forEach>
            </table>
            &nbsp;&nbsp;&nbsp;<c:out value="${fn:length(zipCodeList)}"/> <spring:message code="rowsFound"/><br/><br/>
            <sec:authorize ifAnyGranted="ROLE_BF_ZIP_ADD">
            &nbsp;&nbsp;&nbsp;<span style="font-size: 15px; font-weight: bold;"><a href="../hospital/addZipCode.htm">Add Zipcode</a></span> 
            </sec:authorize>
        </div>
    </body>
</html>